/**
 * 表格配置
 * 机构管理 tenant-manage
 */
const headerConfig = {
  'tenant-manage': [
    {
      prop: 'tenantName',
      name: '租户名称',
      minWidth: 100
    },
    {
      prop: 'tenantCode',
      name: '租户编码',
      minWidth: 100
    },
    {
      prop: 'userName',
      name: '主账号',
      minWidth: 100
    },
    {
      prop: 'tenantRoleName',
      name: '主账号角色',
      minWidth: 100
    },
    {
      prop: 'effectiveTm',
      name: '生效日期',
      minWidth: 100
    },
    {
      prop: 'expirationTm',
      name: '失效日期',
      minWidth: 100
    },
    // {
    //   prop: 'statusName',
    //   name: '状态',
    //   minWidth: 100
    // },
    {
      prop: 'statusName',
      name: '状态',
      minWidth: 100,
      componentCell: 'CellSwitch',
      authId: 'grass-core:tenant:enableOrDisable',
      switchConfig: {
        valueTypeProp: 'code',
        dataProp: 'status',
        activeCode: 1,
        activeName: '启用',
        inactiveCode: 2,
        inactiveName: '禁用',
        switchPath: 'tenant.enableOrDisable',
        switchParamsProp: { id: 'id' }
      }
    },
    {
      prop: 'remark',
      name: '描述',
      minWidth: 100
    },
    {
      name: '操作',
      width: 200,
      fixed: 'right',
      thStyle: { 'text-align': 'left' },
      operateList: [
        {
          type: 'btnText',
          label: '编辑',
          customRouter: true,
          id: 'tenant-manage-edit',
          authId: 'grass-core:tenant:update',
          config: { type: 'text' }
        },
        {
          type: 'btnText',
          label: '重置密码',
          id: 'tenant-manage-resetPassword',
          authId: 'grass-core:tenant:resetPassword',
          config: { type: 'text' }
        },
        {
          type: 'btnText',
          label: '删除',
          id: 'tenant-manage-delete',
          authId: 'grass-core:tenant:deleteById',
          style: { color: '#f74a5c' },
          config: { type: 'text' }
        }
      ]
    }
  ]
}

export default {}
export { headerConfig }
